﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class main : System.Web.UI.Page
{
    private int GetDateSetCount()
    {
        int intCount = 0;
        DataSet dst = null;
        ClsAnnunciatorDAL cls_Annunciator = new ClsAnnunciatorDAL();

        dst = cls_Annunciator.GetAnnunciatorDataSet(0);

        if (dst != null && dst.Tables[0].Rows.Count > 0)
        {
            intCount = dst.Tables[0].Rows.Count;
        }

        dst = cls_Annunciator.GetAnnunciatorDataSet(1);

        if (dst != null && dst.Tables[0].Rows.Count > 0)
        {
            intCount += dst.Tables[0].Rows.Count;
        }

        dst = cls_Annunciator.GetAnnunciatorDataSet(2);

        if (dst != null && dst.Tables[0].Rows.Count > 0)
        {
            intCount += dst.Tables[0].Rows.Count;
        }

        return intCount;
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        // 弹出消息框暂时屏蔽掉 Xc110813
        //if (!IsPostBack)
        //{
        //    string strPara = this.Page.Request.Params["id"];

        //    if (strPara != null && strPara.Trim() != "" && strPara.Trim() == "-1")
        //    {
        //        this.PopupWin.Visible = false;

        //        this.lblJs.Text = "<script>ChangWin(0, -1);</script>";
        //    }

        //    int intCount = this.GetDateSetCount();

        //    if (intCount != 0)
        //    {
        //        string strMsg = "<br>您有<b>" + intCount + "</b>条新的预警信息，请及时处理！<br><br><input type='checkbox' id='isShowWini'><img src='App_Images/title.gif' border='0'>";

        //        this.PopupWin.Message = strMsg;
        //        this.PopupWin.Visible = true;
        //    }
        //    else
        //    {
        //        this.PopupWin.Visible = false;
        //    }
        //}
        //else
        //{
        //    this.lblJs.Text = "";
        //}
    }
}
